<?php
namespace app\admin\controller;
use think\Controller;
use app\admin\model\Course as CourseModel;
use app\admin\model\Student as StudentModel;
use app\admin\model\Enrollment as EnrollmentModel;

class Index extends BaseController
{
    public function index()
    {

        $studentCount = StudentModel::count();
        $courseCount = CourseModel::count();
        $enrollmentCount = EnrollmentModel::count();

        $this->assign('studentCount',$studentCount);
        $this->assign('courseCount',$courseCount);
        $this->assign('enrollmentCount',$enrollmentCount);
        return $this->fetch();
    }
}